//
//  OrderModel.m
//  sensen_ios
//
//  Created by pro on 16/3/23.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "PayOrderModel.h"
#import "ZKCryptionHandle.h"

@implementation PayOrderModel

- (BOOL)isLegal {
    
    NSString * code = self.code;
    NSString * name =  self.name; // @"%e8%ae%a2%e5%8d%95-T1446561087U29P28";
    NSString * desc = self.desc;  //@"%e8%ae%a2%e5%8d%95-T1446561087U29P28";
    NSString * total_price = self.total_price;
    
    NSString * encode = [NSString stringWithFormat:@"%@%@%@%@", code, name, desc, total_price];
    NSLog(@"encode = %@", encode);
    NSString * encodeKey = [ZKCryptionHandle pay_crypt:encode];
    
    return [encodeKey isEqualToString:self.key];
}

@end
